//
//  NSDate+string.h
//  BaseFrame
//
//  Created by 蓝水软件 on 2016/11/19.
//  Copyright © 2016年 xiaojiang. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (tool)
//date转string
+ (NSString *)StringFromDate:(NSDate *)date dateFormat:(NSString *)stringFormat;

//string转date
+ (NSDate *)dateFromString:(NSString *)string dateFormat:(NSString *)stringFormat;

//eg:num = 1 即明天    num = -1 即昨天
+ (NSString *)todayAddDaysToString:(NSInteger)num;
+ (NSDate *)todayAddDaysToDate:(NSInteger)num;


/**
 @param date01       日期1
 @param date02       日期2
 @param stringFormat 日期格式

 @return 1 :日期2大    0:相同   -1:日期1大
 */
+ (int)compareDate:(NSString*)date01 withDate:(NSString*)date02 dateFormat:(NSString *)stringFormat;
@end
